package com.db.pck.service.impl;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.db.core.vo.R;
import com.db.pck.entity.PackageTenantPerms;
import com.db.pck.mapper.PackageTenantPermsMapper;
import com.db.pck.service.PackageTenantPermsService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fasterxml.jackson.databind.ser.Serializers;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author db
 * @since 2023-11-01
 */
@Service
public class PackageTenantPermsServiceImpl extends ServiceImpl<PackageTenantPermsMapper, PackageTenantPerms> implements PackageTenantPermsService {


    @Transactional
    @Override
    public R insert(PackageTenantPerms packageTenantPerms) {
        baseMapper.insert(packageTenantPerms);
        return R.ok("添加成功");
    }

    @Transactional
    @Override
    public R update(PackageTenantPerms packageTenantPerms) {
        baseMapper.updateById(packageTenantPerms);
        return R.ok("修改成功");
    }

    @Transactional
    @Override
    public R deleteById(Integer pckPermId) {
        baseMapper.deleteById(pckPermId);
        return R.ok("删除成功");
    }
}
